
#include "Abstruction.h"

using namespace npBridge;


Abstruction::Abstruction() // class inheritance
{
    //To initialize data member;
    this->actWrapper = nullptr;
}

Abstruction::~Abstruction()
{
    //To delete dynamic data member
    delete this->actWrapper;
}

Abstruction::Abstruction(const Abstruction& cpy) // class inheritance
{
    //To copy data member
    this->actWrapper = cpy.actWrapper->clone();
}

Abstruction& Abstruction::operator=(const Abstruction& asn)
{
    if (this == &asn)
    {
        return *this;
    }
    else
    {
        //To invoke base class operator=
        
        //To assign data member, note to delete dynamic member if exists.
        delete this->actWrapper;
        this->actWrapper = asn.actWrapper->clone();

        return *this;
    }
}

Abstruction* Abstruction::clone() const
{
    //return new
    return new Abstruction(*this);
}

//other constructors
Abstruction::Abstruction(ActWrapper* actWrapper)
{
    this->actWrapper = actWrapper;
}

//public methods
void Abstruction::setActWrapper(ActWrapper* actWrapper) throw()
{
    this->actWrapper = actWrapper;
}

void Abstruction::act() throw()
{
    this->actWrapper->act();
}

//protected methods

//private methods
